<!DOCTYPE >
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8" />
    <title>问题管理</title>
    <link rel="icon" type="image/x-icon" href="/static/images/logoIcon.icon">
    <link rel="stylesheet" href="/static/css/question.css">
</head>

<body>
<!-- 头部导航条 -->
<div id="nav">
    <div class="heard">
        <div class="logo">
            <p>ITArmy后台管理</p>
        </div>
        <a href="/user/sign" class="signout">退出</a>
        <a href="/user/index" class="signout">主页</a>
    </div>

</div>
<!-- 侧边栏 -->
<div id="aside">
    <div class="menu">
        <ul>
            <li>
                <a href="/admin/Blog/list">博客管理&nbsp;<img src="/static/images/blog.svg" /></a>
            </li>
            <li>
                <a href="/admin/Type/list">博客类型&nbsp;<img src="/static/images/kind.svg"/></a>
            </li>
            <li>
                <a href="/admin/Serialize/list">连载管理&nbsp;<img src="/static/images/stroy.svg" /></a>
            </li>
            <li>
                <a href="/admin/Order/list">订单管理&nbsp;<img src="/static/images/order.svg" /></a>
            </li>
            <li>
                <a href="/admin/User/list">用户管理&nbsp;<img src="/static/images/user.svg" alt="" /></a>
            </li>
            <li class="active">
                <a href="/admin/Question/list">问题管理&nbsp;<img src="/static/images/question.svg" /></a>
            </li>
            <li>
                <a href="/admin/Exchange/list">汇率管理&nbsp;<img src="/static/images/rate.svg" alt="" /></a>
            </li>
            <li>
                <a href="/admin/ContributeAudit/list">投稿审核&nbsp;<img src="/static/images/word.svg"></a>
            </li>
        </ul>
    </div>
</div>
<div class="fill">
    <table class="table table-bordered">
        <thead class="heard">
        <tr>
            <th>问题管理列表</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td class="we">
                <div id="remove" style="margin:12px 10px;">
                    <a class="delatemore" href="javascript:;">
                        <img src="/static/images/rubsh.svg">
                        <span>批量删除</span>
                    </a>
                </div>
                <form class="navbar-form navbar-left" role="search">
                    筛选:<input type="text" id="search" placeholder="搜索问题内容">
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                    <input type="text" id="look" placeholder="根据问题类型搜索">
                    <input type="button" id="lookfor" value="查询">
                    <input type="button" id="back" value="返回">
                </form>
            </td>
        </tr>
        </tbody>
    </table>

    <div class="through">
        <table id="employeeTable">
            <thead >
                <tr style="background-color: #F5FAFA">
                    <th class="switch"><input type="checkbox" id="check"></th>
                    <th>问题</th>
                    <th>发问者</th>
                    <th>问题标题</th>
                    <th>分类</th>
                    <th>问题内容</th>
                    <th>是否解决</th>
                    <th>问题赏金</th>
                    <th>回答者</th>
                    <th style="width: 150px;">时间</th>
                    <th style="width: 100px;">操作</th>
                </tr>
            </thead>
            <tbody>
                <tr th:each="Question:${questionList.list}">
                    <td class="switch"><input type="checkbox" name="user"></td>
                    <td th:text="${Question.qId}"></td>
                    <td th:text="${Question.aUId}"></td>
                    <td th:text="${Question.qTitle}"></td>
                    <td th:text="${Question.tId}"></td>
                    <td th:text="${Question.qAddress}"></td>
                    <td th:text="${Question.qSolve}"></td>
                    <td th:text="${Question.qReward}"></td>
                    <td th:text="${Question.rUId}"></td>
                    <td th:text="${#dates.format(Question.qTime,'yyyy-MM-dd HH:mm:ss')}"></td>
                    <td class="itemDelete">
                        <button class="delate">删除</button>
                        <button class="compiler">编辑</button>
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="page" th:if="${questionList.pages>0}"><!--分页-->
            <ul class="pageUl">
                <li class="pageLi"><a th:href="@{'/admin/Question/list?page=1'}">首页</a></li>
                <li class="pageLi" th:if="${questionList.pageNum-3 >=1}"><a th:href="@{'/admin/Question/list?page=' + ${questionList.pageNum-3}}" th:text="${questionList.pageNum -3}" >1</a></li>
                <li class="pageLi" th:if="${questionList.pageNum-2 >=1}"><a th:href="@{'/admin/Question/list?page=' + ${questionList.pageNum-2}}" th:text="${questionList.pageNum -2}" >1</a></li>
                <li class="pageLi" th:if="${questionList.pageNum-1 >=1}"><a th:href="@{'/admin/Question/list?page=' + ${questionList.pageNum-1}}" th:text="${questionList.pageNum -1}" >1</a></li>
                <li class="pageLi active1"><a th:href="@{'/admin/Question/list?page=' + ${questionList.pageNum}}" th:text="${questionList.pageNum}" ></a></li>
                <li th:if="${questionList.pageNum+1} <= ${questionList.pages}" ><a th:href="@{'/admin/Question/list?page=' + ${questionList.pageNum+1}}" th:text="${questionList.pageNum +1}" >1</a></li>
                <li th:if="${questionList.pageNum+2} <= ${questionList.pages}" ><a th:href="@{'/admin/Question/list?page=' + ${questionList.pageNum+2}}" th:text="${questionList.pageNum +2}" >1</a></li>
                <li th:if="${questionList.pageNum+3} <= ${questionList.pages}" ><a th:href="@{'/admin/Question/list?page=' + ${questionList.pageNum+3}}" th:text="${questionList.pageNum +3}" >1</a></li>
                <li th:class="${questionList.pageNum == questionList.pages}?'disabled' : ''" ><a th:href="@{'/admin/Question/list?page=' + ${questionList.pageNum+1}}">下一页</a></li>
            </ul>
        </div>
        <!--修改的模态框-->
        <div class="modal movefade movemodal" id="movemodal">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <i>X</i>
                        <h4>问题管理</h4>
                    </div>
                    <div class="modal-body">
                        <input type="hidden">
                        <p>
                            问题:&nbsp;&nbsp;<input type="text" id="question">
                        </p>
                        <p>
                            发问者:&nbsp;&nbsp;<input type="text" id="asker">
                        </p>
                        <p>
                            问题的标题:<input type="text" id="title">
                        </p>
                        <p>
                            问题内容:<input type="text" id="content">
                        </p>
                        <p>
                            分类:<input type="text" id="kind">
                        </p>
                        <p>
                            <input type="hidden" id="solve">
                        </p>
                        <p>
                            问题赏金:<input type="text" id="glod">
                        </p>
                        <p>
                            <input type="hidden" id="anwser">
                        </p>
                        <p>
                            <input type="hidden" id="time">
                        </p>
                    </div>
                    <div class="modal-footer">
                        <button class="same addbtn_ok">确定</button>
                        <button class="same addbtn_no">取消</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--增加的模态框-->
    <div class="modal addfade" id="addmodal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <i>X</i>
                    <h4>问题管理</h4>
                </div>
                <div class="modal-body">
                    <p>
                        问题:<input type="text" />
                    </p>
                    <p>
                        发问者:<input type="text" />
                    </p>
                    <p>
                        问题标题:<input type="text" />
                    </p>
                    <p>
                        问题内容:<input type="text">
                    </p>
                    <p>
                        分类:<input type="text">
                    </p>
                    <p>
                        是否解决:<input type="text">
                    </p>
                    <p>
                        问题赏金:<input type="text">
                    </p>
                    <p>
                        回答者:<input type="text">
                    </p>
                </div>
                <div class="modal-footer">
                    <button class="same addbtnok">确定</button>
                    <button class="same addbtn_no">取消</button>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script src="/static/js/jquery-3.3.1.min.js"></script>
<script src="/static/js/question.js"></script>

</html>